package com.aleaho.cftrack.http.entity;

import com.google.gson.annotations.SerializedName;
import com.unnamed.b.atv.model.TreeNode;

import java.util.List;

/**
 * @author Aleaho
 * @version 1.0
 * @date 2017/11/13
 * @desc
 */

public class DepartmentTreeEntity extends BaseEntity {

    /**
     * id : 1
     * departmentid : 3401040438
     * departmentname : 长丰农商银行
     * description : 总行
     * parent : null
     * full_path :
     * user : [{"id":1,"name":"系统管理员","permission":{"id":1,"dutyId":0,"dutyname":"系统管理"},"user_is_active":true,"user":1,"username":"admin"},{"id":2,"name":"杨杨","permission":{"id":1,"dutyId":0,"dutyname":"系统管理"},"user_is_active":true,"user":2,"username":"aleaho"},{"id":4,"name":"董事长","permission":{"id":2,"dutyId":1,"dutyname":"总行领导"},"user_is_active":true,"user":4,"username":"A04370"},{"id":5,"name":"杜行长","permission":{"id":2,"dutyId":1,"dutyname":"总行领导"},"user_is_active":true,"user":5,"username":"A04371"},{"id":6,"name":"管理员","permission":{"id":3,"dutyId":2,"dutyname":"业务主管"},"user_is_active":true,"user":6,"username":"A04372"}]
     */

    @SerializedName("id")
    private int id;
    @SerializedName("departmentid")
    private String departmentid;
    @SerializedName("departmentname")
    private String departmentname;
    @SerializedName("description")
    private String description;
    @SerializedName("parent")
    private Object parent;
    @SerializedName("full_path")
    private String full_path;
    @SerializedName("user")
    private List<UserBean> user;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDepartmentid() {
        return departmentid;
    }

    public void setDepartmentid(String departmentid) {
        this.departmentid = departmentid;
    }

    public String getDepartmentname() {
        return departmentname;
    }

    public void setDepartmentname(String departmentname) {
        this.departmentname = departmentname;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Object getParent() {
        return parent;
    }

    public void setParent(Object parent) {
        this.parent = parent;
    }

    public String getFull_path() {
        return full_path;
    }

    public void setFull_path(String full_path) {
        this.full_path = full_path;
    }

    public List<UserBean> getUser() {
        return user;
    }

    public void setUser(List<UserBean> user) {
        this.user = user;
    }

    public static class UserBean {
        /**
         * id : 1
         * name : 系统管理员
         * permission : {"id":1,"dutyId":0,"dutyname":"系统管理"}
         * user_is_active : true
         * user : 1
         * username : admin
         */

        @SerializedName("id")
        private int id;
        @SerializedName("name")
        private String name;
        @SerializedName("permission")
        private PermissionBean permission;
        @SerializedName("user_is_active")
        private boolean user_is_active;
        @SerializedName("user")
        private int user;
        @SerializedName("username")
        private String username;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public PermissionBean getPermission() {
            return permission;
        }

        public void setPermission(PermissionBean permission) {
            this.permission = permission;
        }

        public boolean isUser_is_active() {
            return user_is_active;
        }

        public void setUser_is_active(boolean user_is_active) {
            this.user_is_active = user_is_active;
        }

        public int getUser() {
            return user;
        }

        public void setUser(int user) {
            this.user = user;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public static class PermissionBean {
            /**
             * id : 1
             * dutyId : 0
             * dutyname : 系统管理
             */

            @SerializedName("id")
            private int id;
            @SerializedName("dutyId")
            private int dutyId;
            @SerializedName("dutyname")
            private String dutyname;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getDutyId() {
                return dutyId;
            }

            public void setDutyId(int dutyId) {
                this.dutyId = dutyId;
            }

            public String getDutyname() {
                return dutyname;
            }

            public void setDutyname(String dutyname) {
                this.dutyname = dutyname;
            }
        }
    }
}
